<script type="text/javascript">
    function validate_search() {
        var text_search = $('#text-search').val();
        if((text_search.length < 2) || (text_search.length > 50)) {
            alert('Nội dung tìm kiếm gồm từ 2 đến 50 kí tự');
            return false;
        }
        else {
            return true;
        }
    }

$(document).ready(function(){
    if ( navigator.appName=="Microsoft Internet Explorer" ) {
        $('#text-search').addClass('checkie');
    }
    
    var controller = '<?php echo Zend_Controller_Front::getInstance()->getRequest()->getControllerName();?>'; 
    if(controller == 'index'){
      $('.home').addClass('active-navigation');
    }
    else {
        if(controller == 'fashion'){
            $('.fashion').addClass('active-navigation');
        }
    	else if(controller == 'baby'){
    		$('.baby').addClass('active-navigation');
    	}
    	else if(controller == 'evaluation'){
    		$('.evaluation').addClass('active-navigation');
    	}
        else if(controller == 'furniture'){
    		$('.furniture').addClass('active-navigation');
    	}
        else if(controller == 'news'){
    		$('.news').addClass('active-navigation');
    	}
    }
});
</script>
<div class="nav-top">
    <span style="padding-left:16px;">Hotline:</span><span style="color: red;">&nbsp;&nbsp;0485.859.788</span>
    <span class="support"><i class="icon-support"></i><a href="#">Trợ giúp</a></span>
</div>
<div class="head">
    <a class="logo" href="<?php echo $this->baseUrl(''); ?>">
        <img src="<?php echo $this->DirImg;?>/logo.png"/>
    </a>
    <div class="search-content">
        <form action="<?php echo $this->baseUrl('tim-kiem'); ?>" onsubmit="return validate_search()" method="get" class="form-search">
            <input type="text" id="text-search" name="text-search" placeholder="Quần áo, đồ dùng trẻ em, đồ gia dụng..."/>
            <input type="submit" name="search-button" value=""/>
        </form>
    </div>
    <div class="navigation">
        <ul>
            <li><a class="home" href="<?php echo $this->baseUrl(''); ?>">TRANG CHỦ</a></li>
            <li><a class="fashion" href="<?php echo $this->url(array('action'=>'index','controller'=>'fashion','module'=>'default'),'fashion'); ?>">THỜI TRANG XUẤT KHẨU</a></li>
            <li><a class="baby" href="<?php echo $this->url(array('action'=>'index','controller'=>'baby','module'=>'default'),'baby'); ?>">ĐỒ TRẺ EM</a></li>
            <li><a class="furniture" href="<?php echo $this->url(array('action'=>'index','controller'=>'furniture','module'=>'default'),'furniture'); ?>">ĐỒ GIA DỤNG</a></li>
            <li><a class="news" href="<?php echo $this->url(array('action'=>'index','controller'=>'news','module'=>'default'),'news'); ?>">TIN TỨC</a></li>
            <li><a class="evaluation" href="<?php echo $this->url(array('action'=>'index','controller'=>'evaluation','module'=>'default'),'evaluation'); ?>">ĐÁNH GIÁ</a></li>
        </ul>
        <a href="<?php echo $this->baseUrl('mua-hang'); ?>" class="total-cart">GIỎ HÀNG (<?php echo count($_SESSION['cart']); ?>)</a>
        <div class="bottom-navigation"></div>
    </div>
    
</div>